package tree.test226;

import listbyorder.utils.TreeNode;

/**
 * @author code_yc
 * @version 1.0
 * @date 2020/7/17 11:21
 */
public class Solution1 {

    public TreeNode invertTree(TreeNode root) {
        if (root == null) return root;
        TreeNode rL = invertTree(root.left);
        TreeNode rR = invertTree(root.right);
        root.left = rR;
        root.right = rL;
        return root;
    }
}
